//
//  selectDistrict.m
//  cityStar
//
//  Created by joyban on 15-2-3.
//  Copyright (c) 2015年 tiny. All rights reserved.
//

#import "selectDistrict.h"

@implementation selectDistrict


-(id)init
{
    if (self = [super init]) {
    }
    return self;
}
+(selectDistrict *) shardDistrictInfo// 单例
{
    static selectDistrict *sharedInstance = nil;
    static dispatch_once_t oncePredicate;
    dispatch_once(&oncePredicate, ^{
        sharedInstance = [[self alloc] init];
    });
    
    return sharedInstance;
}

-(void)setClasscityArray:(NSMutableArray *)selectProvince
{
    self.DistrictArray = selectProvince;
    self.DistrictNameArray  = [[NSMutableArray alloc]init];
    self.DistrictIsopenArray  = [[NSMutableArray alloc]init];
    self.DistrictIdArray  = [[NSMutableArray alloc]init];
    
    for (NSDictionary *dict in selectProvince) {
        NSString *name = dict[@"name"];
        NSString *ProvinceId = [NSString stringWithFormat:@"%@",dict[@"id"]];
        NSString *ProvinceIsopen = [NSString stringWithFormat:@"%@",dict[@"isopen"]];
        [self.DistrictIsopenArray addObject:ProvinceIsopen];
        [self.DistrictIdArray addObject:ProvinceId];
        [self.DistrictNameArray addObject:name];
    }
}

@end
